Libraries used in the analysis

library(ggplot2)
library(knitr)
library(dplyr)
library(DT)

Loading in the necessary data

base_dir <- "/media/theron/My_Passport/Ali_data/HTMBmice_RNAseq_Data/MB01JHU504/MB01JHU504_000_analysis/DESeq2/refseq_genes"
PD1_vs_combo <- read.table(sprintf("%s/%s",base_dir,"PD1_vs_Combo_genes_DESeq2.txt"),header=T)
untreated_vs_combo <- read.table(sprintf("%s/%s",base_dir,"Untreated_vs_Combo_genes_DESeq2.txt"),header=T)
untreated_vs_PD1 <- read.table(sprintf("%s/%s",base_dir,"Untreated_vs_PD1_genes_DESeq2.txt"),header=T)

PD1 vs Combo (PD1/Combo)

Differential Expression Data

which_sig <- vapply(as.numeric(PD1_vs_combo$PD1_vs_Combo_pvalue),function(val){
  if (is.na(val)){
    return("Insig")
  }
  if (val <= 0.05){
    return("Sig")
  } else {
    return("Insig")
  }},character(1))
PD1_vs_combo$significance_pval <- which_sig

which_sig <- vapply(PD1_vs_combo$PD1_vs_Combo_padj,function(val){
  if (is.na(val)){
    return("Insig")
  }
  if (val <= 0.05){
    return("Sig")
  } else {
    return("Insig")
  }},character(1))
PD1_vs_combo$significance_padj <- which_sig

PD1_vs_combo_table <- PD1_vs_combo %>% dplyr::filter(!is.na(PD1_vs_Combo_pvalue) | !is.na(PD1_vs_Combo_padj))
datatable(PD1_vs_combo_table)

Volcano Plots

ggplot(PD1_vs_combo,aes(x=PD1_vs_Combo_log2FoldChange, y=-log10(PD1_vs_Combo_pvalue), color = significance_pval))+geom_point()

ggplot(PD1_vs_combo,aes(x=PD1_vs_Combo_log2FoldChange, y=-log10(PD1_vs_Combo_padj), color = significance_padj))+geom_point()

Untreated vs Combo (Untreated/Combo)

Differential Expression Data

which_sig <- vapply(as.numeric(untreated_vs_combo$Untreated_vs_Combo_pvalue),function(val){
  if (is.na(val)){
    return("Insig")
  }
  if (val <= 0.05){
    return("Sig")
  } else {
    return("Insig")
  }},character(1))
untreated_vs_combo$significance_pval <- which_sig

which_sig <- vapply(untreated_vs_combo$Untreated_vs_Combo_padj,function(val){
  if (is.na(val)){
    return("Insig")
  }
  if (val <= 0.05){
    return("Sig")
  } else {
    return("Insig")
  }},character(1))
untreated_vs_combo$significance_padj <- which_sig

untreated_vs_combo_table <- untreated_vs_combo %>% dplyr::filter(!is.na(Untreated_vs_Combo_pvalue) | !is.na(Untreated_vs_Combo_padj))
datatable(untreated_vs_combo_table)

Volcano Plots

ggplot(untreated_vs_combo,aes(x=Untreated_vs_Combo_log2FoldChange, y=-log10(Untreated_vs_Combo_pvalue), color = significance_pval))+geom_point()

ggplot(untreated_vs_combo,aes(x=Untreated_vs_Combo_log2FoldChange, y=-log10(Untreated_vs_Combo_padj), color = significance_padj))+geom_point()

Untreated vs PD1 (Untreated/PD1)

Differential Expression Data

which_sig <- vapply(as.numeric(untreated_vs_PD1$Untreated_vs_PD1_pvalue),function(val){
  if (is.na(val)){
    return("Insig")
  }
  if (val <= 0.05){
    return("Sig")
  } else {
    return("Insig")
  }},character(1))
untreated_vs_PD1$significance_pval <- which_sig

which_sig <- vapply(untreated_vs_PD1$Untreated_vs_PD1_padj,function(val){
  if (is.na(val)){
    return("Insig")
  }
  if (val <= 0.05){
    return("Sig")
  } else {
    return("Insig")
  }},character(1))
untreated_vs_PD1$significance_padj <- which_sig
untreated_vs_PD1_table <- untreated_vs_PD1 %>% dplyr::filter(!is.na(Untreated_vs_PD1_pvalue) | !is.na(Untreated_vs_PD1_padj))
datatable(untreated_vs_PD1_table)

Volcano Plots

ggplot(untreated_vs_PD1,aes(x=Untreated_vs_PD1_log2FoldChange, y=-log10(Untreated_vs_PD1_pvalue), color = significance_pval))+geom_point()

ggplot(untreated_vs_PD1,aes(x=Untreated_vs_PD1_log2FoldChange, y=-log10(Untreated_vs_PD1_padj), color = significance_padj))+geom_point()